/**
 * Created by LI on 2020/7/7.
 */

public class Lyl {

    public static void main(String[] args) {
        System.out.println("总对数:" + rabbit(12));
    }

    /**
     * 计算兔子总数
     */
    private static int rabbit(int month) {
        if (month == 0) {
            throw new RuntimeException("month<=0");
        }
        if (month == 1 || month == 2) {
            return 1;
        }
        return rabbit(month - 1) + rabbit(month - 2);
    }
}
